package com.laomou.logdog.loginfo;


public class RuntimeExceptionParser {
    private String[] ElvTags = new String[]{"StrictMode", "AndroidRuntime", "ActivityThread", "MessageQueue-JNI"};
    private String[] FlvTags = new String[]{"libc"};
    private String[] IlvTags = new String[]{"am_crash", "Process"};

    public boolean processLogE(LogInfo logInfo) {
        String logLv = logInfo.getLogLv();
        String logTag = logInfo.getTag();
        String logMsg = logInfo.getMessage();
        if ("E".equals(logLv)) {
            for (String tag : ElvTags) {
                if (logTag.contains(tag)) {
                    return true;
                }
            }
            return false;
        }
        if ("F".equals(logLv)) {
            for (String tag : FlvTags) {
                if (logTag.contains(tag)) {
                    return true;
                }
            }
            return false;
        }
        if ("I".equals(logLv)) {
            for (String tag : IlvTags) {
                if (logTag.contains(tag)) {
                    return true;
                }
            }
            return false;
        }
        return false;
    }
}
